
option explicit

include_once Q_PATH & "\includes\lang\lang.vbs"


class CTranslator


    ' --------------------------------------------------------------------------
    ' Attributes
	private m_oWords

	
    ' --------------------------------------------------------------------------
    ' Eventos

    public sub Class_Initialize()
        set m_oWords = createobject("scripting.dictionary")
        call InitTranslator ( m_oWords )
    end sub
    
    public sub Class_Terminate()
        m_oWords.RemoveAll
        set m_oWords = nothing
    end sub


    ' --------------------------------------------------------------------------
    ' Propiedades Publicas

	public property get oWords()
		set oWords = m_oWords
	end property	
	
	public property set oWords(byval o)
		set m_oWords = o
	end property


    ' --------------------------------------------------------------------------
    ' Metodos Publicos
	public function Translation ( byval sWord )
		if oWords.exists(sWord) then
			Translation = me.oWords.item(sWord)
		else
			Translation = sWord
		end if
	end function

end class



